#ifndef prs_GrfImage_H
#define prs_GrfImage_H

#include "grf.h"
#include "sntText.h"
#include "prs_FrmNodes.h"

namespace prs {

///////////////////////////////////////////////////////////////////////////////

struct TRuleGrfImage : public snt::TRule
{
  TRuleGrfImage(snt::text::TContext &Context,svl::TVariant &VImage,svl::TVariant &VType,svl::TVariant &VParentNode);
  //
private:
  //
  bool FImage (snt::text::TIdent::TFuncClosureDoEntryParams &Params);
  bool FFImage(snt::text::TIdent::TFuncClosureDoEntryParams &Params);
  // 
  bool InitImage(svl::TString &Name);
  //
  svl::TVariant &vImage,&vType,&vParentNode;
  svl_Except;
};

///////////////////////////////////////////////////////////////////////////////

struct TRuleGrfImageBorderOld : public snt::TRule
{
  TRuleGrfImageBorderOld(snt::text::TContext &Context,svl::TVariant &VImages,svl::TVariant &VParentNode);
  //
private:
  bool FImage (snt::text::TIdent::TFuncClosureDoEntryParams &Params);
  static void FEnd(snt::TParams &Params);
  static void FAdd(snt::TParams &Params);
  //
  grf::TImageGdiP *Images[9];
  snt::TAlter A1, A2;
  svl::TVariant &vParentNode,vThis,Num,&vImages;
  svl_Except;
};

///////////////////////////////////////////////////////////////////////////////

struct TRuleGrfImageBorder : public snt::TRule
{
  TRuleGrfImageBorder(snt::text::TContext &Context,svl::TVariant &VBorderInfo,svl::TVariant &VParentNode);
  //
private:
  bool FImage (snt::text::TIdent::TFuncClosureDoEntryParams &Params);
  static void FSetMulti (snt::TParams &Params);
  static void FSetNoMulti (snt::TParams &Params);
  static void FEnd(snt::TParams &Params);
  //
  grf::TBorderInfo borderInfo;
  snt::TAlter A;
  snt::TRule Border;
  svl::TVariant &vParentNode,vThis,V1,V2,V3,V4,&vBorderInfo;
  svl_Except;
};

///////////////////////////////////////////////////////////////////////////////

struct TRuleGrfImageCenter : public snt::TRule
{
  TRuleGrfImageCenter(snt::text::TContext &Context,svl::TVariant &VImage,svl::TVariant &VParentNode);
  //
private:
  //
  bool FImage (snt::text::TIdent::TFuncClosureDoEntryParams &Params);
  // 
  svl::TVariant &vImage,&vParentNode;
  svl_Except;
};

///////////////////////////////////////////////////////////////////////////////

}

#endif
